/*
 * @Author: your name
 * @Date: 2020-12-18 17:00:17
 * @LastEditTime: 2020-12-28 10:10:37
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \wms2\src\api\settlement.js
 */
import request from '@/utils/request'
// 费用明细列表 -----------------------------------------------------------
export function expenseDetailList(listQuery) {
    return request({
      url: '/wms/expenseDetail',
      method: 'get',
      params: listQuery
    })
  }
  // 费用明细信息
  export function allocationDetail(code) {
    return request({
      url: `/wms/allocation/${code}`,
      method: 'get'
    })
  }
  // 删除
export function expenseDetailDelete(code) {
  return request({
    url: `/wms/expenseDetail/${code}`,
    method: 'DELETE',
  })
}
// 详情
export function expenseDetailDetail(code) {
  return request({
    url: `/wms/expenseDetail/${code}`,
    method: 'get'
  })
}

    // 结算
    export function settlement(data) {
      return request({
        url: '/wms/expenseDetail/settlement',
        method: 'POST',
        data
      })
    }
  
  
  // 费用明细修改
  export function expenseDetailEdit(code,amount,remarks) {
    return request({
      url: `/wms/expenseDetail/${code}`,
      method: 'put',
      params:{amount:amount,remarks:remarks}

    })
  }
  // 收款单列表 -----------------------------------------------------------
export function receiptList(listQuery) {
  return request({
    url: '/wms/receipt',
    method: 'get',
    params: listQuery
  })
}
// 收款单信息
export function receiptDetail(code) {
  return request({
    url: `/wms/receipt/${code}`,
    method: 'get'
  })
}
// 提交
export function receiptSubmit(data) {
  return request({
    url: '/wms//receipt/submit',
    method: 'POST',
    data
  })
}


// 收款单修改
export function receiptEdit(data) {
  return request({
    url: '/wms/receipt',
    method: 'put',
    data
  })
}

  // 删除
  export function receiptDelete(code) {
    return request({
      url: `/wms/receipt/${code}`,
      method: 'DELETE',
    })
  }
  
// 审核
export function receiptAudit(status,verifyOpinion,code) {
  return request({
    url: `/wms/receipt/approve/${code}`,
    method: 'put',
    params:{status:status,verifyOpinion:verifyOpinion}
  })
}
